function [] = test(m,n,d)
if d == 2
a = rand(m,n);
tic


disp('projSplx');
tic
d = projSplx(a);
toc

disp('The original program starts');
tic 
for i = 1 : n
    c(:,i) = proj_canonical(a(:,i));
end
toc

err1 = d- c;

disp ('projSplx Error');
disp(sum(abs(err1(:))));  
 end
if d == 3
a = rand(m,n,n);
tic 
disp('projSplx');
tic
d = projSplx(a);
toc

tic
disp('projCanonical');
for i = 1 : n
for j = 1 : n
c(:,i,j) = proj_canonical(a(:,i,j));
end
end
toc
err1 = d- c;

disp ('projSplx Error');
disp(sum(abs(err1(:))));  
end
end

  

    
